Optimal. Leaf size=21 \[ -\frac {x}{a}+\frac {\tanh ^{-1}(\sin (c+d x))}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3973, 3855}
\begin {gather*} \frac {\tanh ^{-1}(\sin (c+d x))}{a d}-\frac {x}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3855
Rule 3973
Rubi steps
\begin {align*} \int \frac {\tan ^2(c+d x)}{a+a \sec (c+d x)} \, dx &=\frac {\int (-a+a \sec (c+d x)) \, dx}{a^2}\\ &=-\frac {x}{a}+\frac {\int \sec (c+d x) \, dx}{a}\\ &=-\frac {x}{a}+\frac {\tanh ^{-1}(\sin (c+d x))}{a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(60\) vs. \(2(21)=42\).
time = 0.10, size = 60, normalized size = 2.86 \begin {gather*} -\frac {d x+\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}{a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(49\) vs.
\(2(21)=42\).
time = 0.07, size = 50, normalized size = 2.38
method | result | size |
risch | \(-\frac {x}{a}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{a d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{a d}\) | \(49\) |
derivativedivides | \(\frac {-2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d}\) | \(50\) |
default | \(\frac {-2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d}\) | \(50\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 78 vs.
\(2 (21) = 42\).
time = 0.49, size = 78, normalized size = 3.71 \begin {gather*} -\frac {\frac {2 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} + \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.67, size = 35, normalized size = 1.67 \begin {gather*} -\frac {2 \, d x - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\tan ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 50 vs.
\(2 (21) = 42\).
time = 0.59, size = 50, normalized size = 2.38 \begin {gather*} -\frac {\frac {d x + c}{a} - \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} + \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.11, size = 25, normalized size = 1.19 \begin {gather*} \frac {2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}-\frac {x}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________